Integrand size = 39, antiderivative size = 168 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {a} (c-d) f \sqrt {g}}+\frac {2 d \arctan \left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {a} \sqrt {c} (c-d) \sqrt {c+d} f \sqrt {g}} \]
-arctan(1/2*cos(f*x+e)*a^(1/2)*g^(1/2)*2^(1/2)/(g*sin(f*x+e))^(1/2)/(a+a*s in(f*x+e))^(1/2))*2^(1/2)/(c-d)/f/a^(1/2)/g^(1/2)+2*d*arctan(cos(f*x+e)*a^ (1/2)*c^(1/2)*g^(1/2)/(c+d)^(1/2)/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1 /2))/(c-d)/f/a^(1/2)/c^(1/2)/(c+d)^(1/2)/g^(1/2)
Time = 8.22 (sec) , antiderivative size = 289, normalized size of antiderivative = 1.72 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=-\frac {2 \left (-2 \arctan \left (\sqrt {\tan \left (\frac {1}{2} (e+f x)\right )}\right )+\frac {d \left (1+\frac {c-d}{\sqrt {-c^2+d^2}}\right ) \arctan \left (\frac {\sqrt {c} \sqrt {\tan \left (\frac {1}{2} (e+f x)\right )}}{\sqrt {d-\sqrt {-c^2+d^2}}}\right )}{\sqrt {c} \sqrt {d-\sqrt {-c^2+d^2}}}+\frac {d \left (-c+d+\sqrt {-c^2+d^2}\right ) \arctan \left (\frac {\sqrt {c} \sqrt {\tan \left (\frac {1}{2} (e+f x)\right )}}{\sqrt {d+\sqrt {-c^2+d^2}}}\right )}{\sqrt {c} \sqrt {-c^2+d^2} \sqrt {d+\sqrt {-c^2+d^2}}}\right ) \cos \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {\tan \left (\frac {1}{2} (e+f x)\right )}}{(c-d) f \sqrt {g \sin (e+f x)} \sqrt {a (1+\sin (e+f x))}} \]
(-2*(-2*ArcTan[Sqrt[Tan[(e + f*x)/2]]] + (d*(1 + (c - d)/Sqrt[-c^2 + d^2]) *ArcTan[(Sqrt[c]*Sqrt[Tan[(e + f*x)/2]])/Sqrt[d - Sqrt[-c^2 + d^2]]])/(Sqr t[c]*Sqrt[d - Sqrt[-c^2 + d^2]]) + (d*(-c + d + Sqrt[-c^2 + d^2])*ArcTan[( Sqrt[c]*Sqrt[Tan[(e + f*x)/2]])/Sqrt[d + Sqrt[-c^2 + d^2]]])/(Sqrt[c]*Sqrt [-c^2 + d^2]*Sqrt[d + Sqrt[-c^2 + d^2]]))*Cos[(e + f*x)/2]*(Cos[(e + f*x)/ 2] + Sin[(e + f*x)/2])*Sqrt[Tan[(e + f*x)/2]])/((c - d)*f*Sqrt[g*Sin[e + f *x]]*Sqrt[a*(1 + Sin[e + f*x])])
Time = 0.89 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3042, 3417, 3042, 3261, 218, 3409, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx\) |
\(\Big \downarrow \) 3417 |
\(\displaystyle \frac {\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{c-d}-\frac {d \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx}{a (c-d)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{c-d}-\frac {d \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx}{a (c-d)}\) |
\(\Big \downarrow \) 3261 |
\(\displaystyle -\frac {2 a \int \frac {1}{\frac {\cos (e+f x) \cot (e+f x) a^3}{\sin (e+f x) a+a}+2 a^2}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f (c-d)}-\frac {d \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx}{a (c-d)}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {d \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx}{a (c-d)}-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {a} f \sqrt {g} (c-d)}\) |
\(\Big \downarrow \) 3409 |
\(\displaystyle \frac {2 d \int \frac {1}{\frac {c \cos (e+f x) \cot (e+f x) a^2}{\sin (e+f x) a+a}+(c+d) a}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f (c-d)}-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {a} f \sqrt {g} (c-d)}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {2 d \arctan \left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {a} \sqrt {c} f \sqrt {g} (c-d) \sqrt {c+d}}-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {a} f \sqrt {g} (c-d)}\) |
-((Sqrt[2]*ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[2]*Sqrt[g*Sin[e + f *x]]*Sqrt[a + a*Sin[e + f*x]])])/(Sqrt[a]*(c - d)*f*Sqrt[g])) + (2*d*ArcTa n[(Sqrt[a]*Sqrt[c]*Sqrt[g]*Cos[e + f*x])/(Sqrt[c + d]*Sqrt[g*Sin[e + f*x]] *Sqrt[a + a*Sin[e + f*x]])])/(Sqrt[a]*Sqrt[c]*(c - d)*Sqrt[c + d]*f*Sqrt[g ])
3.1.28.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e _.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f) Subst[Int[1/(2*b^2 - (a*c - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S in[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_. )*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[-2*(b/f ) Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
Int[1/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f _.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[b/(b* c - a*d) Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]), x], x] - Simp[d/(b*c - a*d) Int[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && (EqQ[a^2 - b^2, 0] || EqQ[c^2 - d^2, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(579\) vs. \(2(133)=266\).
Time = 3.49 (sec) , antiderivative size = 580, normalized size of antiderivative = 3.45
method | result | size |
default | \(-\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \left (\sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) d -\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) c d +\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) d^{2}-\sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, \operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) d -\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, \operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) c d +\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, \operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) d^{2}-2 \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right ) \sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\right ) \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right )}{f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {g \sin \left (f x +e \right )}\, \left (c -d \right ) \sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\) | \(580\) |
-1/f*(csc(f*x+e)-cot(f*x+e))^(1/2)*((-(c-d)*(c+d))^(1/2)*(((-(c-d)*(c+d))^ (1/2)-d)*c)^(1/2)*arctan((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^ (1/2)+d)*c)^(1/2))*d-(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2)*arctan((csc(f*x+e) -cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2))*c*d+(((-(c-d)*(c+ d))^(1/2)-d)*c)^(1/2)*arctan((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+ d))^(1/2)+d)*c)^(1/2))*d^2-(-(c-d)*(c+d))^(1/2)*(((-(c-d)*(c+d))^(1/2)+d)* c)^(1/2)*arctanh((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)-d) *c)^(1/2))*d-(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2)*arctanh((csc(f*x+e)-cot(f* x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2))*c*d+(((-(c-d)*(c+d))^(1/ 2)+d)*c)^(1/2)*arctanh((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1 /2)-d)*c)^(1/2))*d^2-2*arctan((csc(f*x+e)-cot(f*x+e))^(1/2))*(-(c-d)*(c+d) )^(1/2)*(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2)*(((-(c-d)*(c+d))^(1/2)+d)*c)^(1 /2))*(cos(f*x+e)+sin(f*x+e)+1)/(a*(1+sin(f*x+e)))^(1/2)/(g*sin(f*x+e))^(1/ 2)/(c-d)/(-(c-d)*(c+d))^(1/2)/(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2)/(((-(c-d) *(c+d))^(1/2)+d)*c)^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 310 vs. \(2 (133) = 266\).
Time = 1.58 (sec) , antiderivative size = 3175, normalized size of antiderivative = 18.90 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\text {Too large to display} \]
integrate(1/(c+d*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="fricas")
[-1/4*(sqrt(2)*(a*c^2 + a*c*d)*g*sqrt(-1/(a*g))*log((4*sqrt(2)*(3*cos(f*x + e)^2 + (3*cos(f*x + e) + 4)*sin(f*x + e) - cos(f*x + e) - 4)*sqrt(a*sin( f*x + e) + a)*sqrt(g*sin(f*x + e))*sqrt(-1/(a*g)) + 17*cos(f*x + e)^3 + 3* cos(f*x + e)^2 + (17*cos(f*x + e)^2 + 14*cos(f*x + e) - 4)*sin(f*x + e) - 18*cos(f*x + e) - 4)/(cos(f*x + e)^3 + 3*cos(f*x + e)^2 + (cos(f*x + e)^2 - 2*cos(f*x + e) - 4)*sin(f*x + e) - 2*cos(f*x + e) - 4)) - sqrt(-(a*c^2 + a*c*d)*g)*d*log(((128*a*c^4 + 256*a*c^3*d + 160*a*c^2*d^2 + 32*a*c*d^3 + a*d^4)*g*cos(f*x + e)^5 - (128*a*c^4 + 192*a*c^3*d + 64*a*c^2*d^2 - 4*a*c* d^3 - a*d^4)*g*cos(f*x + e)^4 - 2*(208*a*c^4 + 368*a*c^3*d + 195*a*c^2*d^2 + 32*a*c*d^3 + a*d^4)*g*cos(f*x + e)^3 + 2*(64*a*c^4 + 94*a*c^3*d + 29*a* c^2*d^2 - 4*a*c*d^3 - a*d^4)*g*cos(f*x + e)^2 + (289*a*c^4 + 480*a*c^3*d + 230*a*c^2*d^2 + 32*a*c*d^3 + a*d^4)*g*cos(f*x + e) + 8*((16*c^3 + 24*c^2* d + 10*c*d^2 + d^3)*cos(f*x + e)^4 - (24*c^3 + 28*c^2*d + 7*c*d^2)*cos(f*x + e)^3 + 51*c^3 + 59*c^2*d + 17*c*d^2 + d^3 - (66*c^3 + 83*c^2*d + 27*c*d ^2 + 2*d^3)*cos(f*x + e)^2 + (25*c^3 + 28*c^2*d + 7*c*d^2)*cos(f*x + e) + ((16*c^3 + 24*c^2*d + 10*c*d^2 + d^3)*cos(f*x + e)^3 - 51*c^3 - 59*c^2*d - 17*c*d^2 - d^3 + (40*c^3 + 52*c^2*d + 17*c*d^2 + d^3)*cos(f*x + e)^2 - (2 6*c^3 + 31*c^2*d + 10*c*d^2 + d^3)*cos(f*x + e))*sin(f*x + e))*sqrt(-(a*c^ 2 + a*c*d)*g)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)) + (a*c^4 + 4*a *c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4)*g + ((128*a*c^4 + 256*a*c^3*d...
\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int \frac {1}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \sqrt {g \sin {\left (e + f x \right )}} \left (c + d \sin {\left (e + f x \right )}\right )}\, dx \]
\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int { \frac {1}{\sqrt {a \sin \left (f x + e\right ) + a} {\left (d \sin \left (f x + e\right ) + c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]
integrate(1/(c+d*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="maxima")
Exception generated. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\text {Exception raised: TypeError} \]
integrate(1/(c+d*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="giac")
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m operator + Error: Bad Argument Valueindex.cc index_m operator + Error: Bad Argument ValueDon e
Timed out. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int \frac {1}{\sqrt {g\,\sin \left (e+f\,x\right )}\,\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\left (c+d\,\sin \left (e+f\,x\right )\right )} \,d x \]